package com.example.livingadminmaster.controller;

import com.example.livingadminmaster.dto.MaintenanceDto;
import com.example.livingadminmaster.service.MaintenanceRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/maintenance_records")
public class MaintenanceRecordsController {
    @Autowired
    private MaintenanceRecordsService maintenanceRecordsService;

    /**
     * 获取维修类型表数据
     * @return
     */
    @GetMapping("/get_records")
    @ResponseBody
    @CrossOrigin
    public List<MaintenanceDto> getMaintenanceRecords() {
        List list=maintenanceRecordsService.getMaintenanceRecords();
        return list;
    }
}
